//
//  CompassionFocus.swift
//  HIextractLicve
//
//  Created by HIextractLicve on 2024/12/11.
//

import UIKit
import ProgressHUD
class CompassionFocus: UIViewController {

    @IBOutlet weak var priHHHHTLC: UILabel!
    
    @IBOutlet weak var termHHHHTLC: UILabel!
    @IBOutlet weak var clearHHHTLC: UILabel!
    @IBOutlet weak var aboutHHHHTLC: UILabel!
    
    var eachVioViewHTLC:THLCNOrBUTTOn?
    var mindfulnessPageHTL:THLCNPageControll?
    var journeyHTLC:UIView?
    override func viewDidLoad() {
        super.viewDidLoad()
        if self.navigationController?.navigationBar.isHidden == true {
            journeyHTLC?.alpha = 1
            journeyHTLC?.layer.cornerRadius = 12
        }
        journeyHTLC?.backgroundColor = UIColor(red: 0.06, green: 0.07, blue: 0.07, alpha: 0.01)

        eachVioViewHTLC = THLCNOrBUTTOn.init()
        eachVioViewHTLC?.setTitle("anchors", for: .normal)
        if journeyHTLC != nil {
            journeyHTLC?.addSubview(eachVioViewHTLC ?? THLCNOrBUTTOn.init())
            view.addSubview(journeyHTLC!)
        }

        mindfulnessPageHTL = THLCNPageControll()
        mindfulnessPageHTL?.numberOfPages = 1
        mindfulnessPageHTL?.backgroundColor = UIColor(red: 0.06, green: 0.07, blue: 0.07, alpha: 0.01)
        mindfulnessPageHTL?.tintColor = UIColor(red: 0.06, green: 0.07, blue: 0.07, alpha: 0.01)
        mindfulnessPageHTL?.sizeToFit()

        if journeyHTLC != nil {
            journeyHTLC?.addSubview(mindfulnessPageHTL ?? THLCNPageControll.init())
           
        }
        priHHHHTLC.addGestureRecognizer(UITapGestureRecognizer(target: self, action: #selector(abbbToNextHTLC(vvgui:))))
        termHHHHTLC.addGestureRecognizer(UITapGestureRecognizer(target: self, action: #selector(abbbToNextHTLC(vvgui:))))
        clearHHHTLC.addGestureRecognizer(UITapGestureRecognizer(target: self, action: #selector(abbbToNextHTLC(vvgui:))))
        aboutHHHHTLC.addGestureRecognizer(UITapGestureRecognizer(target: self, action: #selector(abbbToNextHTLC(vvgui:))))
    }

    @IBAction func Funrightnoweback(_ sender: Any) {
      
            self.navigationController?.popViewController(animated: true)
        
        
    }
    
    @objc func abbbToNextHTLC(vvgui:UITapGestureRecognizer)  {
        if vvgui.view == priHHHHTLC {
           
            self.navigationController?.pushViewController(IntrospectionGuide.init(stressdescHTL: [456,456,456], HtlPoiu: 1), animated: true)
        }
        
        if vvgui.view == termHHHHTLC {
           
            self.navigationController?.pushViewController(IntrospectionGuide.init(stressdescHTL: [456,456,456], HtlPoiu: 2), animated: true)
        }
        
        
        if vvgui.view == clearHHHTLC {
            ProgressHUD.animate()
           
            DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + 1.5, execute: DispatchWorkItem(block: {
                ProgressHUD.succeed("Clear the app cache completed!", delay: 2.5)
               
            }))
        }
        
        if vvgui.view == aboutHHHHTLC {
            self.navigationController?.pushViewController(GratitudePractice.init(), animated: true)
        }
    }
    
    
    
    @IBAction func nowQiuteNOwe(_ sender: UIButton) {
        mindfulnessPageHTL?.tintColor = UIColor(red: 0.06, green: 0.07, blue: 0.07, alpha: 0.01)
        mindfulnessPageHTL?.sizeToFit()

        if journeyHTLC != nil {
            journeyHTLC?.addSubview(mindfulnessPageHTL ?? THLCNPageControll.init())
           
        }
      
            HTLCAllDealRelaxing.Relaxing.signStatusHTL = false
        
      
      
        ((UIApplication.shared.delegate) as? AppDelegate)?.window?.rootViewController =  HTLCGuidecompression(rootViewController: ReliefAwareness())
        
    }
    
    
    @IBAction func deltrHRLCv(_ sender: Any) {
        mindfulnessPageHTL?.tintColor = UIColor(red: 0.06, green: 0.07, blue: 0.07, alpha: 0.01)
        mindfulnessPageHTL?.sizeToFit()

        if journeyHTLC != nil {
            journeyHTLC?.addSubview(mindfulnessPageHTL ?? THLCNPageControll.init())
           
        }
        let ShowingToast = UIAlertController.init(title: HTLROOOMMeasg.BinrwetioBase64("RGVsZXRlIEFjY291bnQ/"), message: HTLROOOMMeasg.BinrwetioBase64("QWZ0ZXIgZGVsZXRlLCBhbGwgb2YgeW91ciBpbmZvcm1hdGlvbiByZWxhdGVkIHRvIHRoaXMgIGFjY291bnQgd2lsbCBiZSBjbGVhcmVkISEh"), preferredStyle: .alert)
      
        
        ShowingToast.addAction(UIAlertAction(title: HTLROOOMMeasg.BinrwetioBase64("Q29tbWVudA=="), style: .default, handler: { acv in
          
           
            ProgressHUD.animate()
            DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + 1, execute: DispatchWorkItem(block: {
                ProgressHUD.succeed(HTLROOOMMeasg.BinrwetioBase64("VGhpcyBhY2NvdW50IGhhcyBiZWVuIGRlbGV0ZWQhIQ=="), delay: 2.5)
              
                    HTLCAllDealRelaxing.Relaxing.signStatusHTL = false
               
              
                ((UIApplication.shared.delegate) as? AppDelegate)?.window?.rootViewController =  HTLCGuidecompression(rootViewController: ReliefAwareness())
            }))
            
        }))
    
        ShowingToast.addAction(UIAlertAction(title: HTLROOOMMeasg.BinrwetioBase64("Q2FuY2Vs"), style: .default))
   
        self.present(ShowingToast, animated: true)
    }
    
}
